<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <link rel="stylesheet" href="../../../static/css/login.css" />
  <title>博客</title>
  <script src="../../../static/js/jquery-3.6.3-min.js"></script>
</head>

<body>
  <header class="page_header">
    <h3 class="tit">个人博客</h3>
    <div class="head">
      <div>网站首页</div>
      <div>文章列表</div>
      <div>我的相册</div>
      <div>时间轴</div>
      <a href="/upload">
        <div>上传</div>
      </a>

      <div>关于我</div>
      <div>发布博客</div>
    </div>
    <div class="head head_end">
      <!-- 判断有没有session 和 判断session中有没有user这个键,如果有则执行, 否则执行else中的代码 -->
      {% if request.session and request.session.user %}
      <a>
        欢迎: {{ request.session.user.username }}
      </a>
      <a href="/note/list">
        <div>笔记</div>
      </a>
      <div class="head head_end">
        <a href="/logout">
          <div>退出登录</div>
        </a>
      </div>
      {% else %}
      <a href="/log">
        <div>登录</div>
      </a>
      <a href="/reg">
        <div>注册</div>
      </a>
      {% endif %}
    </div>
  </header>
  <div class="nei"></div>
  <!-- <script src="./js/index.js"></script> -->
</body>

</html>